package com.ylyq.ylxx.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ylyq.ylxx.entity.YlyqCity;
import com.ylyq.ylxx.entity.YlyqCreativeContact;
import com.ylyq.ylxx.model.ResponseData;
import com.ylyq.ylxx.model.bean.OceanenginePlanInfo;
import com.ylyq.ylxx.model.request.GetCityRequest;
import com.ylyq.ylxx.model.request.SaveContanctRequest;
import com.ylyq.ylxx.service.IYlyqCreativeContactService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import java.util.List;

/**
 * <p>
 * 需要一键生成创意的联系人 前端控制器
 * </p>
 *
 * @author xiaweichao
 * @since 2020-08-11
 */
@RestController
@RequestMapping("/creativeContact")
@Api(description = "需要一键生成创意的联系人的相关接口")
public class YlyqCreativeContactController {

    @Autowired
    private IYlyqCreativeContactService iYlyqCreativeContactService;

    @PostMapping("/saveContanct")
    @ApiOperation(value = "保存需要一键生成创意的联系人")
    public ResponseData saveContanct(@RequestBody SaveContanctRequest saveContanctRequest) {
        YlyqCreativeContact ylyqCreativeContact=new YlyqCreativeContact();
        BeanUtils.copyProperties(saveContanctRequest,ylyqCreativeContact);
        iYlyqCreativeContactService.save(ylyqCreativeContact);
        return new ResponseData(ResponseData.Result.SUCCESS);
    }
}
